package com.iotek.ssm.service.impl;

import com.iotek.ssm.mapper.TrainMapper;
import com.iotek.ssm.pojo.CustomQueryVo;
import com.iotek.ssm.pojo.Train;
import com.iotek.ssm.service.TrainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("trainService")
public class TrainServiceImpl implements TrainService {
    @Autowired
    private TrainMapper trainMapper;

    public void addTrain(Train train) throws Exception {
        trainMapper.addTrain(train);
    }

    public void updateTrain(Train train) throws Exception {
        trainMapper.updateTrain(train);
    }

    public List<Train> findTrainList(CustomQueryVo customQueryVo) throws Exception {
        return trainMapper.findTrainList(customQueryVo);
    }
}
